package com.njitt.bysj.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * @description:
 * @author: wyj
 * @time: 2022/3/25 20:19
 */
@NoArgsConstructor
@Data
@ToString
public class Item {
    @JsonProperty("homeInfo")
    private HomeInfoDTO homeInfo;
    @JsonProperty("logoInfo")
    private LogoInfoDTO logoInfo;
    @JsonProperty("menuInfo")
    private List<MenuInfoDTO> menuInfo;

    @NoArgsConstructor
    @Data
    public static class HomeInfoDTO {
        @JsonProperty("title")
        private String title;
        @JsonProperty("href")
        private String href;
    }

    @NoArgsConstructor
    @Data
    public static class LogoInfoDTO {
        @JsonProperty("title")
        private String title;
        @JsonProperty("image")
        private String image;
        @JsonProperty("href")
        private String href;
    }

    @NoArgsConstructor
    @Data
    public static class MenuInfoDTO {
        @JsonProperty("title")
        private String title;
        @JsonProperty("icon")
        private String icon;
        @JsonProperty("href")
        private String href;
        @JsonProperty("target")
        private String target;
        @JsonProperty("child")
        private List<ChildDTO> child;

        @NoArgsConstructor
        @Data
        public static class ChildDTO {
            @JsonProperty("title")
            private String title;
            @JsonProperty("href")
            private String href;
            @JsonProperty("icon")
            private String icon;
            @JsonProperty("target")
            private String target;
            @JsonProperty("child")
            private List<ChildDTO> child;

        }
    }
}
